package com.mantru.iotpot.dao;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Environment;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;

import androidx.annotation.Nullable;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

/**
 * 菜谱管理表--步骤表
 * 作者： cmh
 * 日期： 2022/12/19
 */

public class t_vegetable_info_steep
{
    public String table_name = "t_vegetable_info_steep";
    public String steep_id,vegetable_id,steep_type,steep_index,fire_value,time_value,time_long,speed_value,rotation_value,nozzle1_value,nozzle2_value,nozzle3_value,tts_text, update_time;
    public String create_sql = "create table t_vegetable_info_steep(steep_id integer primary key, vegetable_id integer, steep_type integer, steep_index integer, fire_value integer, time_value text, time_long integer, speed_value integer, rotation_value integer, nozzle1_value integer, nozzle2_value integer, nozzle3_value integer, tts_text text, update_time text)";
    public String drop_sql = "drop table t_vegetable_info_steep";
    public String entity_sql = "select * from t_vegetable_info_steep where vegetable_id=? and steep_id=?";
    public String list_sql = "select * from t_vegetable_info_steep where vegetable_id=? order by steep_index";
    public String clear_sql = "delete from t_vegetable_info_steep where vegetable_id=?";
    public String max_sql = "select ifnull(max(steep_id),0) as steep_id from t_vegetable_info_steep";
    public String update_ttstext_sql = "update t_vegetable_info_steep set tts_text=? where vegetable_id=? and steep_id=?";

    public String[] GetEntityValues()
    {
        String[] values = new String[2];
        values[0] = vegetable_id;
        values[1] = steep_id;
        return values;
    }

    public String[] GetClearValues()
    {
        String[] values = new String[1];
        values[0] = vegetable_id;
        return values;
    }

    public String[] GetUpdateTTSValues()
    {
        String[] values = new String[3];
        values[0] = tts_text;
        values[1] = vegetable_id;
        values[2] = steep_id;
        return values;
    }

    public ContentValues GetInsertContentValues()
    {
        ContentValues cv = new ContentValues();
        cv.put("steep_id", steep_id);
        cv.put("vegetable_id", vegetable_id);
        cv.put("steep_type", steep_type);
        cv.put("steep_index", steep_index);
        cv.put("fire_value", fire_value);
        cv.put("time_value", time_value);
        cv.put("time_long", time_long);
        cv.put("speed_value", speed_value);
        cv.put("rotation_value", rotation_value);
        cv.put("nozzle1_value", nozzle1_value);
        cv.put("nozzle2_value", nozzle2_value);
        cv.put("nozzle3_value", nozzle3_value);
        cv.put("tts_text", tts_text);
        cv.put("update_time", update_time);
        return cv;
    }
}
